<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>

        var a=[1,2,3,5];

        for (let i=0;i<3;i++) {

            console.log(a[i]);
        }

        a.forEach(function (item,index) {

           // console.log(item,index)
        });


        a.forEach((item,index)=>{
            console.log(item,index)
        })



    </script>
</head>
<body>

</body>
</html>